import { request } from '@/utils/request';

export function login(data) {
  data.scope = 'ui';
  data.grant_type = 'password';
  data.client_id = 'browser';
  data.type = 'account';
  return request.post<any>(
    {
      url: '/api/login',
      headers: { Authorization: 'Basic YnJvd3Nlcjo=', 'Content-Type': 'application/x-www-form-urlencoded' },
      params: data,
    },
    { isTransformResponse: false },
  );
}

export const uploadFileApi = (data) => {
  return request.post({
    url: '/api/admin/file/uploadBaseFile',
    data,
  });
};
